Conversation
SeunginLyu
left a comment
There was a problem hiding this comment.
It looks good overall, but you forgot to push your code for part2!
| @@ -2,7 +2,7 @@ | |||
| """ | |||
| YOUR HEADER COMMENT HERE | |||
There was a problem hiding this comment.
For the upcoming mini projects, please add your name and a short description of the project.
| """ Checks for each letter and returns the complement | ||
| (might not be the most effiicent way) and returns | ||
| 'This is not a nucleotide' if any other letters are implented | ||
| Returns the complementary nucleotide |
There was a problem hiding this comment.
Nice! Adding appropriate docstrings is always helpful.
| elif nucleotide == 'G': | ||
| return 'C' | ||
| else: | ||
| return 'This is not a nucleotide' |
There was a problem hiding this comment.
Another way to hand errors 👍
raise ValueError(nucleotide, " is not a nucleotide")
| # index = index + 3 | ||
| # newstr1.append(dna[index+3:]) | ||
| # #checks to find | ||
| # return newstr1 |
There was a problem hiding this comment.
remove comments when submitting your final code.
| returns: a list of non-nested ORFs | ||
| >>> find_all_ORFs_oneframe("ATGCATGAATGTAGATAGATGTGCCC") | ||
| ['ATGCATGAATGTAGA', 'ATGTGCCC'] | ||
| >>> find_all_ORFs_oneframe("TTTATGCCCTAGATAATGTTTTAGATGCCCTAG") |
There was a problem hiding this comment.
Nice! Always add more custom test cases to verify your function.
| pass | ||
| #print(find_all_ORFs_oneframe("ATGCATGAATGTAGATAGATGTGCCC")) | ||
| #print(find_all_ORFs_oneframe('AAAAAAAATAGAAA')) | ||
| #print(find_all_ORFs_oneframe('AAAATTTTTTAATTTTTTATTATA')) |
There was a problem hiding this comment.
again, remove comments for the final code
gene_finder.py
Outdated
| # returns: a list of all amino acid sequences coded by the sequence dna. | ||
| # """ | ||
| # # TODO: implement this | ||
| # pass |
There was a problem hiding this comment.
Looks like you forgot to push your code for part2. can you push those changes as well?
|
Sorry about that!
I have just pushed the code.
Best,
John Wen
…On Mon, Oct 2, 2017 at 12:00 PM, Seungin Lyu ***@***.***> wrote:
***@***.**** commented on this pull request.
It looks good overall, but you forgot to push your code for part2!
------------------------------
In gene_finder.py
<#4 (comment)>:
> @@ -2,7 +2,7 @@
"""
YOUR HEADER COMMENT HERE
For the upcoming mini projects, please add your name and a short
description of the project.
------------------------------
In gene_finder.py
<#4 (comment)>:
> @@ -21,7 +21,10 @@ def shuffle_string(s):
def get_complement(nucleotide):
- """ Returns the complementary nucleotide
+ """ Checks for each letter and returns the complement
+ (might not be the most effiicent way) and returns
+ 'This is not a nucleotide' if any other letters are implented
+ Returns the complementary nucleotide
Nice! Adding appropriate docstrings is always helpful.
------------------------------
In gene_finder.py
<#4 (comment)>:
> @@ -30,42 +33,89 @@ def get_complement(nucleotide):
>>> get_complement('C')
'G'
"""
- # TODO: implement this
- pass
+ if nucleotide == 'A':
+ return 'T'
+ elif nucleotide == 'T':
+ return 'A'
+ elif nucleotide == 'C':
+ return 'G'
+ elif nucleotide == 'G':
+ return 'C'
+ else:
+ return 'This is not a nucleotide'
Another way to hand errors 👍
raise ValueError(nucleotide, " is not a nucleotide")
------------------------------
In gene_finder.py
<#4 (comment)>:
> + else:
+ return newstr
+ return newstr
+
+# V1
+# def find_all_ORFs_oneframe(dna):
+# newstr1 = []
+# newstr1.append(rest_of_ORF(dna))
+# stop_codon = ['TAG','TAA','TGA']
+# index = 0
+# #newstr1 adds the first chunk to the list
+# while dna[index:index+3] not in stop_codon:
+# index = index + 3
+# newstr1.append(dna[index+3:])
+# #checks to find
+ # return newstr1
remove comments when submitting your final code.
------------------------------
In gene_finder.py
<#4 (comment)>:
> @@ -78,28 +128,52 @@ def find_all_ORFs_oneframe(dna):
returns: a list of non-nested ORFs
>>> find_all_ORFs_oneframe("ATGCATGAATGTAGATAGATGTGCCC")
['ATGCATGAATGTAGA', 'ATGTGCCC']
+ >>> find_all_ORFs_oneframe("TTTATGCCCTAGATAATGTTTTAGATGCCCTAG")
Nice! Always add more custom test cases to verify your function.
------------------------------
In gene_finder.py
<#4 (comment)>:
> """
- # TODO: implement this
- pass
+ #print(find_all_ORFs_oneframe("ATGCATGAATGTAGATAGATGTGCCC"))
+ #print(find_all_ORFs_oneframe('AAAAAAAATAGAAA'))
+ #print(find_all_ORFs_oneframe('AAAATTTTTTAATTTTTTATTATA'))
again, remove comments for the final code
------------------------------
In gene_finder.py
<#4 (comment)>:
> +# 'MR'
+# >>> coding_strand_to_AA("ATGCCCGCTTT")
+# 'MPA'
+# """
+# # TODO: implement this
+# pass
+#
+#
+# def gene_finder(dna):
+# """ Returns the amino acid sequences that are likely coded by the specified dna
+#
+# dna: a DNA sequence
+# returns: a list of all amino acid sequences coded by the sequence dna.
+# """
+# # TODO: implement this
+# pass
Looks like you forgot to push your code for part2. can you push those
changes as well?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AeO8pnq1T1XY6hDWbaGUKkWD_IXBFq7Rks5soQi5gaJpZM4PiAsE>
.
|
Completed miniproject 1 with revisions.